﻿using Light.Framework;
using Light.Framework.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Test.Models
{
    /// <summary>
    /// 用户实体
    /// </summary>
    [Table]
    public class DemoUser : Entity
    {

        [PrimaryKey(IsAutoIncrement = true)]
        public override string ID
        {
            get;
            set;
        }

        /// <summary>
        /// 名称
        /// </summary>
        [Column("FName")]
        public string Name { get; set; }

        /// <summary>
        /// 编号
        /// </summary>
        [Column("NumberVar")]
        public string Number { get; set; }

        /// <summary>
        /// 是否为超级管理员
        /// </summary>
        [Column]
        public bool IsSuper { get; set; }

        /// <summary>
        /// 创建日期
        /// </summary>
        [Column]
        public DateTime TimeCreated { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Belongs("Creater_ID", JoinBehaviour = JoinBehaviour.Left)]
        public DemoUser Creater { get; set; }
    }
}